<?php
$api = app('Dingo\Api\Routing\Router');

$api->version('v1', [
  'namespace'  =>  'Zxf5115\Laravel\Phrase\Controllers\Api'
], function ($api)
{
  $api->group([
    'middleware' => 'api.throttle', // 启用节流限制
    'limit' => 1000, // 允许次数
    'expires' => 1, // 分钟
    'prefix' => 'api/business' // 接口前缀
  ], function ($api)
  {
    $api->group(['middleware' => ['black.list', 'decrypt.request', 'encrypt.response']], function ($api) {
      // 短语路由
      $api->group(['prefix'  => 'phrase'], function ($api) {
        $api->get('data', 'PhraseController@data');
      });
    });
  });
});
